<template>
	<view>
		<u-button type="primary" icon="map" text="图标按钮" class="custom-style" @click="login"></u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loginType:'DEVICE'
			}
		},
		onLoad() {
			const token = uni.getStorageSync("token")
			// if (token === undefined || token === '') {
			// 	uni.redirectTo({
			// 		url: "/pages/login/login"
			// 	})
			// }
		},
		methods: {
			login() {
				// uni.$http.post("vi/login", {username:this.username, passwd: this.passwd})
				this.$api.post(this.$url.login, {loginType:'DEVICE'})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.custom-style {
		color: #ff0000;
		width: 400rpx;
	}
</style>
